package com.biostime.qdingding.modules.qd.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.biostime.qdingding.common.service.CrudService;
import com.biostime.qdingding.modules.qd.dao.CourseserialDao;
import com.biostime.qdingding.modules.qd.entity.Courseserial;

/**
 * 课程系列Service
 * @author king
 * @version 2015-11-05
 */
@Service
@Transactional(readOnly = true)
public class CourseserialService extends CrudService<CourseserialDao, Courseserial> {
	
	@Override
	public List<Courseserial> findList(Courseserial entity) {
		dataScopeFilter(entity, "dsf", "id=a.center_id", "id=a.create_by");
		
		return super.findList(entity);
	}
	
	public List<Courseserial> findListByLevel(String level) {
		return dao.findListByLevel(level);
	}
	
 	//<!-- ————————————————————————————楚河汉界，谁敢动我的，打死 ————————————————————————————————————-->	
	public List<HashMap<String,Object>> apiFindList(String centerId){
		return dao.apiFindList(centerId);
	}
	
	public List<HashMap<String,Object>> apiGetSerialIds(String levelId,String centerId){
		return dao.apiGetSerialIds(levelId, centerId);
	}
	
}
